home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / S9301.ZIP;1 / BRACHMAN.ZIP / PEEKB.C
Encoding:
C/C++ Source or Header  |  1992-11-16  |  1.7 KB  |  59 lines

  1. /*       P E E K B . C
  2.  
  3.     
  4.                   ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  5.                   ≥     fi€€€› €€€€     fl€€€€€€  €€€€€ ≥
  6.                   ≥     €€€€€fi€€€€›      fl€€€€  €€€€€ ≥
  7.                   ≥    €fi€€€€›€€€€€        fl€€  €€€€€ ≥
  8.                   ≥   fi€›€€€€€fi€€€€›     ‹€  fl  €€€€€ ≥
  9.                   ≥   €€€fi€€€€›€€€€€    €€€     €€€€€ ≥
  10.                   ≥  fi€€€›€€€€€fi€€€€›    fl€  ‹  €€€€€ ≥
  11.                   ≥  €€€€€fi€€€€›€€€€€      ‹€€  €€€€€ ≥
  12.                   ≥ fi€€€€€›€€€€€fi€€€€›   ‹€€€€  €€€€€ ≥
  13.                   ≥ €€€€€€€fi€€€€›€€€€€ ‹€€€€€€  €€€€€ ≥
  14.                   √ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ¥
  15.                   ≥        MicroEndeavors, Inc.       ≥
  16.                   ≥       3150 Township Line Road     ≥
  17.                   ≥       Drexel Hill, PA   19026     ≥
  18.                   ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  19.   
  20.    demonstration 'C' library - adds the following:
  21.       peekb  - peek a byte from an address
  22. */
  23.  
  24.  
  25. #include <dos.h>
  26. #include <pro_ext.h>
  27.     
  28.  
  29. /****************************************************************** 
  30.   FUNCTION PEEKB
  31.   
  32.   called from FoxPro as:
  33.     peekb(segment,offset)  
  34.   returns:
  35.     byte found at that address
  36.   (line 0 of video is at -18432:0000)
  37.   (line 1 of video is at -18432:0160)
  38. *******************************************************************/
  39. void far peekb (ParamBlk FAR *parm)
  40. {         
  41.   char __far *memory;
  42.   unsigned int newseg,newoff;
  43.   newseg = parm->p[0].val.ev_long;
  44.   newoff = parm->p[1].val.ev_long;
  45.   memory = MK_FP(newseg,newoff);
  46.   _RetInt(memory[0],10);
  47. }
  48.  
  49.  
  50. FoxInfo myFoxInfo[] = {
  51.     {"PEEKB", peekb, 2, "I,I"},
  52. };
  53.  
  54. FoxTable _FoxTable = {
  55.     (FoxTable FAR *)0, sizeof(myFoxInfo) / sizeof(FoxInfo), myFoxInfo
  56. };
  57.  
  58.  
  59.